import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import path from 'path'

// https://vite.dev/config/
export default defineConfig({
  plugins: [vue()],
  resolve: {
    alias: {
      '@': path.resolve(__dirname, '../src')
    }
  },
  server: {
    proxy: {
      // 仅为通知服务配置代理
      '/notice-api': {
        target: 'http://43.143.232.128:59900',
        changeOrigin: true,
        rewrite: (path) => path.replace(/^\/notice-api/, '')
      }
    }
  },
  build: {
    // 指定输出目录
    outDir: '../dist'
  }
})
